02. Run the Starter Code
KOTLIN PART2 L4 A02 Run The Starter Code
You can either download all the sample code to your computer…
…or clone the GitHub repository from the command line and checkout the starter branch.
$ git clone https://github.com/udacity/android-kotlin-geo-fences.git
The starter app contains code to help you get started. It contains some assets, layouts, the opening activity and a file with services that you will complete during this lesson.
Important classes provided for you:
HuntMainActivity.ktis the main class you will be working in. This class contains skeleton code for functions that handle permissions, adding geofences and removing geofences.GeofenceViewModel.ktis theViewModelassociated withHuntMainActivity.kt. This class handles theLiveDataand determines which hint should be shown on screen.NotificationUtils.kt: When you enter a geofence, a notification pops up! This class creates and styles that notification.activity_main.xml: This currently displays an image of an Android but you will implement it to display a hint.GeofenceBroadcastReceiver.kt: This contains skeleton code for theonReceive()method of theBroadcastReceiverwhere you will handle
- Run the app on the emulator or on your own device, you should see the splash page.